#include <stdio.h>
#include <unistd.h>
int main()
{
    while(1) {
        if(0 == access("/tmp/pts", F_OK)) {
            printf("exist.\n");
        }
        else {
            printf("not exist.\n");
        }

        sleep(1);
    }

    return 0;
}
